package com.example.mavendemo.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/calc")
public class CalcController {
    @RequestMapping("/sum")
    public String sum(@RequestParam("num1") Integer i1, @RequestParam("num2") Integer i2) {
        int all = i1 + i2;
        return "计算后的结果为:" + all;
    }
}


